﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   namespace="Bunian.Core.BusinessObjects"
                   assembly="Bunian.Core">


  <class name="Sponsorship" table="Sponsorships" >

    <id name="Id" column="SponsorshipId" unsaved-value="0">
      <generator class="native"/>
    </id>

    <property name="Amount" column="Amount" type="System.Decimal" />
    <property name="Status" column="Status" type="System.Int32" />
    <property name="StartDate" column="StartDate" type="System.DateTime" />
    <property name="Type" column="Type" type="System.Int32" />

    <many-to-one name="SponsorInfo" column="SponsorId" class="Sponsor" cascade="all" />
    <many-to-one name="BeneficiaryTender" column="BeneficiaryTenderId" class="Tender" cascade="all" />
   
  </class>
</hibernate-mapping>